package com.example.bootorderserviceconsumer.controller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.example.bootapi.service.ProviderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Consumer {

    @Reference
    public ProviderService providerService;


    @GetMapping("/hello/{name}")
    public String hello(@PathVariable String name){
        return providerService.sayHello(name);
    }
}
